﻿#region Header
//=============================================================================
//                          GShield (Game Shield)
//=============================================================================
//
// Original Programmer: Shawn Jackson
// Company: WaveTech Digital Technologies, Inc. (http://www.wtdt.com)
// Copyright: (c) 2009 WaveTech Digital Technologies, Inc. All Rights Reserved.
// Assembly: Model
// Code File Name: IEsrbManager.cs
// Code File Date: 1/22/2009
//
// Code File Info: Interface that defines the EsrbManager
//=============================================================================
/*
 * UPDATES
 * -------
 */
#endregion Header

#region License

/*
  GShield - Game Shield
  Copyright (C) 2006-2007 WaveTech Digital Technologies, Inc.
                                http://www.wtdt.com

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#endregion License

#region Includes

using System.IO;

#endregion

namespace WaveTech.GShield.Model.Interfaces
{
	public interface IEsrbManager
	{
		/// <summary>
		/// Determines if the table row is a ESRB Game rating row
		/// </summary>
		/// <param name="inputLine">Input line from a stream</param>
		/// <returns>True if this is a rating row, else false.</returns>
		bool IsRatingTableRow(string inputLine);

		/// <summary>
		/// Extracts the Game Rating information from the stream.
		/// </summary>
		/// <param name="reader">Stream to Parse</param>
		/// <returns>GameRatingDetail object with rating information</returns>
		GameRatingDetail ProcessRatingTableRow(StreamReader reader);

		/// <summary>
		/// Queries the ESRB website, retrieves a HTTP stream and parses the stream.
		/// </summary>
		/// <param name="url">Url to query</param>
		/// <returns>GameRatingDetail for a specific game</returns>
		GameRatingDetail GetGameRating(string url);

		int? GetESRBRating(string title, string publisher, string fileName, string directoryName, string productName);

		int? GetESRBRating(string title, string publisher, string fileName, string directoryName, string productName,
		                   bool trimResults);

		GameRatingDetail GetESRBGameDetail(string title, string publisher, string fileName, string directoryName,
		                                   string productName);

		GameRatingDetail GetESRBGameDetail(string title, string publisher, string fileName, string directoryName,
		                                   string productName, bool trimResults);
	}
}